strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")


Dim objDictionary
Set objDictionary = CreateObject("Scripting.Dictionary")


Set colItems = objWMIService.ExecQuery ( "SELECT * FROM Win32_LogicalDiskToPartition" )
For Each objItem in colItems
	i = instr(objItem.Dependent, "=") + 2
	t = mid(objItem.Dependent,i,2)
	objDictionary.Add objItem.Antecedent, t
Next


Set colItems = objWMIService.ExecQuery ( "SELECT * FROM Win32_DiskDriveToDiskPartition" )
For Each objItem in colItems
	i = instr(objItem.Antecedent, "PHYSICALDRIVE") + 13
	t = mid(objItem.Antecedent,i)
	t = left(t,len(t)-1)
	Wscript.Echo objDictionary.Item(objItem.Dependent) & "=" & t
Next


